namespace Cos.Core.NHibernate.Mapping
{
    #region Usings

    using FluentNHibernate.Mapping;

    #endregion

    public class CustomUserFieldUserValueMap : ClassMap<CustomUserFieldUserValueDataModel>
    {
        #region Constructors and Destructors

        public CustomUserFieldUserValueMap()
        {
            this.Table("CustomUserField_UserValue");
            this.LazyLoad();
            this.CompositeId()
                .KeyProperty(x => x.UserName)
                .KeyProperty(x => x.ApplicationName)
                .KeyProperty(x => x.CustomUserFieldName);

            // References(x => x.CustomUserField).Column("ApplicationName");
            // References(x => x.CustomUserField).Column("ApplicationName");
            // References(x => x.CustomUserField).Column("CustomUserFieldName");
            this.Map(x => x.TextValue);
            this.Map(x => x.DateValue);
            this.Map(x => x.IntValue);
            this.Map(x => x.FloatValue);
        }

        #endregion
    }
}